-- GENERATED SPELL FOR [Magma Lord Bokk] --


function spell0_16043(pUnit, Event) --@Earth Shock,n/a--
pUnit:FullCastSpellOnTarget(23114,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16043', 2279, 1)
end

function spell1_16043(pUnit, Event) --@Ground Tremor,Self--
pUnit:FullCastSpellOnTarget(6524,pUnit)
pUnit:RegisterEvent('Sorts_16043', 2000, 1)
end

function spell2_16043(pUnit, Event) --@Knock Away,n/a--
pUnit:FullCastSpellOnTarget(10101,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16043', 669, 1)
end

function Sorts_16043(pUnit, Event)
local choix_sorts_16043 = math.random(0, 2)
if choix_sorts_16043 == 0 then
pUnit:RegisterEvent('spell0_16043', 1, 1)
end
if choix_sorts_16043 == 1 then
pUnit:RegisterEvent('spell1_16043', 1, 1)
end
if choix_sorts_16043 == 2 then
pUnit:RegisterEvent('spell2_16043', 1, 1)
end
end

function mob16043_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16043', math.random(1500, 3000), 1)
end

function mob16043_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16043_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16043_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16043, 1, 'mob16043_Action')
RegisterUnitEvent(16043, 2, 'mob16043_Leave')
RegisterUnitEvent(16043, 3, 'mob16043_Kill')
RegisterUnitEvent(16043, 4, 'mob16043_Die')
